<?php
//include file
include("../include/session.php");
require_once('../db_conn/conn_db.php');
require_once('header.php');
require_once('../calendar/calendar/classes/tc_calendar.php');
?>
<script language="javascript" src="../calendar/calendar/calendar.js"></script>
<SCRIPT LANGUAGE="JavaScript">
function fjs_formval()
	{
	error = 0;
	if (window.document.form.id.value == "")
	{
		alert("ATTENTION \n\nField Order ID must be filled.");
		window.document.form.id.focus();
		error = 1;
	}
	if (error == 0)
		window.document.form.submit();
	else
	return false;
}</SCRIPT>
</HEAD>
<BODY>
<?php 
$action = (!empty($_GET['id'])) ? 'update' : 'save';
$result = get_order($_GET['id']);
$row1 = mysql_fetch_array($result);
?>
<FORM ACTION=save_order.php?action=update_pay method="post" name="form" id="form">
<table align="left" cellpadding="1" cellspacing="1" border="1">
	<tr>
		<td class="pageName" colspan="2">Form Pembayaran</td>
	</tr>
	<tr> 
      <td>Klien Name</td>
	  <td>
	  <?php 
		$result = get_all_order();
		
		echo "<select name=id>
		<option value='' selected=\"\">---pilih---</option>"; 
		while ($row = mysql_fetch_array($result)) {?>
			<option value=<?php echo $row[0]?> ><?php echo $row[3] ?></option>";
		<?php } ?>
		</select>
		
	  </td>
    </tr>
	<tr> 
      <td>Payment Status</td>
	  <td>
		<select name="payment">
			<option value="0">Un Paid</option>
			<option value="1">50%</option>
			<option value="2">100%</option>
		</select>	
	  </td>
    </tr>
	 <td><input type=submit value=Simpan onClick="javascript:return fjs_formval()"> <input type=reset value=Reset></td>
    </tr>
</table>
</FORM>
</BODY>
</HTML>
